<template>
	<view class="page">
		<navHead :datas="headData"></navHead>
		<view class=" pd-30">
			<view class="card pd-20">
				<view class="ft1">{{ '输入您要描述的内容' }}</view>
				<view class="input pd-10 mt-20"> <up-input v-model="remark" placeholder="请输入"
						placeholderStyle="font-size: 24rpx;color: #999999;" border="none"></up-input></view>
			</view>
		</view>
	</view>
	<view class="bottom ">
		<view class="btn auto flex-center ft c-dbf  mt-20" @click="submit"> 提交</view>
	</view>
</template>
<script setup lang="js">
	import {
		onLoad
	} from '@dcloudio/uni-app'
	import {
		ref,
		reactive,
		onMounted,
		getCurrentInstance
	} from "vue";
	import {
		utils
	} from "@/utils/utils.js";
	import {
		api
	} from "@/utils/api.js";
	
	import navHead from '@/components/navHead.vue';
	const headData = reactive({
		color: '#fff',
		title: '转账备注'
	})
	
	const {
		proxy
	} = getCurrentInstance();

	const remark = ref('')
	onLoad((options) => {
		const eventChannel = proxy.getOpenerEventChannel();
		// 接收数据
		eventChannel.on('toDetail', (data) => {
			remark.value = data.remark
		});
	})

	const submit = () => {
		const eventChannel = proxy.getOpenerEventChannel();
		eventChannel.emit('fromDetail', {
			remark: remark.value
		});
		uni.navigateBack(-1)
	}
</script>

<style lang="scss" scoped>
	.card {
		width: 690rpx;
		height: 500rpx;
		background: #F8F8F8;
		border-radius: 40rpx 40rpx 40rpx 40rpx;

		.input {
			width: 650rpx;
			height: 400rpx;
			background: #FFFFFF;
			border-radius: 20rpx 20rpx 20rpx 20rpx;
		}
	}

	.bottom {
		position: fixed;
		bottom: 0;
		width: 750rpx;
		height: 208rpx;
		background: #F8F8F8;
		border-radius: 0rpx 0rpx 0rpx 0rpx;

		.btn {
			width: 690rpx;
			height: 78rpx;
			background: #333333;
			border-radius: 20rpx 20rpx 20rpx 20rpx;
		}
	}
</style>